home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 January / EnterCD 0105.iso / Internet / Norton Internet Security 2005 / NIS_Retail.EXE / Setup / SymLT / ActRes.DLL / HTML / STOCKPANEL.JS < prev    next >
Encoding:
Text File  |  2004-08-17  |  2.6 KB  |  81 lines

  1. var MainFrame = window.parent;
  2. var TimerID = 0;
  3.  
  4. // DJSMar license Types
  5. var DJSMAR_LicenseType_Violated            = -1;
  6. var DJSMAR_LicenseType_Retail            = 0;
  7. var DJSMAR_LicenseType_Trial            = 1;
  8. var DJSMAR_LicenseType_Rental            = 2;
  9. var DJSMAR_LicenseType_TryDie            = 3;
  10. var DJSMAR_LicenseType_Beta                = 4;
  11. var DJSMAR_LicenseType_Unlicensed        = 5;
  12. var DJSMAR_LicenseType_ESD                = 6;
  13.  
  14. // DJSMar license Zones
  15. var DJSMAR_LicenseZone_Trial            =   (0x00000001); // in a trial period
  16. var DJSMAR_LicenseZone_Expired            =   (0x00000002); // the license has expired
  17. var DJSMAR_LicenseZone_Warning            =   (0x00000004); // the license is about to expire
  18. var DJSMAR_LicenseZone_PreActivation    =   (0x00000008); // the license has never been activated
  19. var DJSMAR_LicenseZone_PostActivation    =    (0x00000010); // the license has been activated
  20. var DJSMAR_LicenseZone_Purchased        =   (0x00000020); // the license is in a purchased(AKA Activated) state
  21. var DJSMAR_LicenseZone_Violated            =   (0x00000040); // the license has been violated (i.e. failed security checks)
  22. var DJSMAR_LicenseZone_Killed            =   (0x00000080); 
  23.  
  24. function OnLoad()
  25. {
  26.     if ( MainFrame.g_bRoadmapFrameLoaded && MainFrame.g_bSelectFrameLoaded )
  27.     {
  28.         UpdatePage();
  29.     }
  30.     else
  31.     {
  32.         // Wait for the other frames to load
  33.         TimerID = window.setInterval( "UpdatePage()", 500 );
  34.     }
  35. }
  36.  
  37. function UpdatePage()
  38. {
  39.     if ( MainFrame.g_bRoadmapFrameLoaded && MainFrame.g_bSelectFrameLoaded )
  40.     {
  41.         clearInterval( TimerID );
  42.  
  43.         var SelectFrame = window.parent.frames("bottom");
  44.         
  45.         try
  46.         {
  47.             stockMessage.style.display="none";
  48.             stockMessage.innerText = g_strViolated.innerText;
  49.             switch ( MainFrame.iLicType )
  50.             {
  51.                 case DJSMAR_LicenseType_TryDie:
  52.                     if ( ((MainFrame.iLicZone & DJSMAR_LicenseZone_Trial) == DJSMAR_LicenseZone_Trial) )
  53.                         stockMessage.innerText = g_strTryDieGrace.innerText;
  54.                     else
  55.                         stockMessage.innerText = g_strTryDieKilled.innerText;
  56.                 break;
  57.                 
  58.                 case DJSMAR_LicenseType_Beta:
  59.                     if (  (MainFrame.iLicZone & (DJSMAR_LicenseZone_Expired|DJSMAR_LicenseZone_PostActivation)) == (DJSMAR_LicenseZone_Expired|DJSMAR_LicenseZone_PostActivation)  )
  60.                         stockMessage.innerText = g_strBetaExpired.innerText;
  61.                 break;
  62.                 
  63.                 default:
  64.                     stockMessage.innerText = g_strViolated.innerText;
  65.                 break;
  66.             }
  67.         }
  68.         catch(err)
  69.         {
  70.             stockMessage.innerText = g_strViolated.innerText;
  71.         }
  72.  
  73.         SelectFrame.SkipButton.innerHTML = FinishBtnText.innerHTML;
  74.         SelectFrame.SkipButton.accessKey = FinishHotKey.innerText;
  75.         SelectFrame.SkipButton.style.display="";
  76.         
  77.         stockMessage.style.display="";
  78.     }
  79. }
  80.  
  81.